package com.heima.feign.article;

import com.heima.feign.article.fallbackFactory.ArticleClientFallbackFactory;
import com.heima.model.article.dto.ArticleDto;
import com.heima.model.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 张一恒
 * @version 1.0
 * @description: ArticleClient feign接口
 * @date 2023/1/13 21:19
 */
@FeignClient(value = "leadnews-article", fallbackFactory = ArticleClientFallbackFactory.class)
public interface ArticleClient {

    /**
     * @description 保存文章数据接口
     * @param articleDto
     * @return com.heima.model.dtos.ResponseResult<java.lang.Long>
     * @author 31115
     * @date 2023/1/13 21:25
     */
    @PostMapping("/api/v1/article/save")
    public ResponseResult<Long> saveArticle(@RequestBody ArticleDto articleDto);
}
